In [ ]:
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
In [ ]:
import csv as csv
csv_file_object = csv.reader(open('titanic_train.csv', 'rb'))
In [ ]:
header = csv_file_object.next()
print(header)
In [ ]:
lines = [line for line in csv_file_object]
In [ ]:
print(lines[0])
In [ ]:
print(lines[1])
In [ ]:
import pandas as pd
titanic_train = pd.read_csv("titanic_train.csv")
In [ ]:
titanic_train
In [ ]:
community_leading_cause = pd.read_csv("LEADINGCAUSESOFDEATH.csv")
community_leading_cause
-9999 Indicate N.A. value from the source data for the Unemployed column on the VUNERABLEPOPSANDENVHEALTH page
-2222 or -2222.2 or -2 nda, no data available, see Data Notes document for details
-1111.1 or -1111 or -1 nrf, no report, see Data Notes document for details
In [ ]:
users = pd.read_csv("users.csv")
In [ ]:
users
In [ ]:
print("Number of users: %d" % len(users))
print("Unique locations: %d" % len(users.location.value_counts()))
In [ ]:
users.location.value_counts()
In [ ]: